﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VietPublisher.BSL.BK;
using VietPublisher.BaseProject.Models.cart;

namespace VietPublisher.Repositories.Interface
{
    public interface ICartRepository
    {
        /// <summary>
        /// Get Current Cart
        /// </summary>
        /// <returns></returns>
        Cart GetCart();

        /// <summary>
        /// Update Quantity by BookID
        /// </summary>
        /// <param name="bookID"></param>
        /// <param name="quantity"></param>
        /// <param name="quantityInStock"></param>
        /// <returns></returns>
        Cart UpdateQuantity(int bookID , int quantity);

        /// <summary>
        /// Add A Item To Cart
        /// </summary>
        /// <returns></returns>
        Cart AddToCart(int bookID, int quantity);

        /// <summary>
        /// Empty Current Cart and Save Profile
        /// </summary>
        /// <param name="cart"></param>
        /// <returns></returns>
        Cart EmptyCart();

        /// <summary>
        /// Get Quantity of a Book in stock
        /// </summary>
        /// <param name="bookID"></param>
        /// <returns></returns>
        int GetQuantityByBookId(int bookID);

        /// <summary>
        /// Remove CartItem by  bookID
        /// </summary>
        /// <param name="bookID"></param>
        /// <returns></returns>
        Cart RemoveCartItem(int bookID);

        /// <summary>
        /// Get CartItem by bookID
        /// </summary>
        /// <param name="bookID"></param>
        /// <returns></returns>
        CartItem GetCartItem(int bookID);

        /// <summary>
        /// Get New CartItem by BookID
        /// </summary>
        /// <param name="bookID"></param>
        /// <returns></returns>
        CartItem GetNewCartItem(int bookID);

    }
}
